/*
 * @Author: 陈亮
 * @LastEditors: 陈亮
 * @GitHub: https://github.com/drinkwd
 * @Description: echarts配置文件
 * @Date: 2019-03-07 13:48:15
 * @LastEditTime: 2019-04-11 10:27:34
 */
const threatLevelopt = {
  tooltip: {
    trigger: 'item',
    // formatter: '{b}',
    textStyle: {
      color: '#fff',
      fontSize: 12,
      fontFamily: '宋体'
    },
    formatter: function (params) {
      var relVal = ''
      relVal = `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${params.color}"></span>${params.name}`
      return relVal
    }
  },
  legend: {
    orient: 'vertical',
    top: '8px',
    left: '240px',
    itemWidth: 9,
    itemHeight: 10,
    icon: 'circle',
    textStyle: {
      color: '#8992a7',
      padding: [0, 0, 0, 10],
      fontFamily: '宋体'
    },
    data: []
  },
  series:
    {
      type: 'pie',
      color: ['#ffc934', '#ff9834', '#ff6634', '#ff3334'],
      radius: ['50%', '70%'],
      center: ['50%', '45%'],
      avoidLabelOverlap: false,
      label: {
        normal: {
          show: false,
          formatter: '{c}',
          position: 'center'
        },
        emphasis: {
          show: true,
          color: '#5c6781',
          textStyle: {
            fontSize: '12',
            fontFamily: 'SimSun'
          }
        }
      },
      data: [

      ]
    },
  grid: {
    top: 5,
    bottom: 5,
    left: 5,
    right: 5
  }
}
const ReportingStatistics = {
  xAxis: {
    type: 'category',
    data: [],
    boundaryGap: false,
    axisTick: {
      show: false
    },
    axisLabel: {
      show: false
    },
    axisLine: {
      lineStyle: {
        color: '#1f92ef'
      }
    }
  },
  yAxis: {
    type: 'value',
    show: false
  },
  tooltip: {
    trigger: 'axis',
    textStyle: {
      fontFamily: '宋体',
      fontSize: '12px'
    },
    axisPointer: {
      type: 'none',
      label: {
        backgroundColor: '#6a7985'

      }
    }
  },
  series: {
    smooth: true,
    name: '上报攻击事件数',
    type: 'line',
    showSymbol: false,
    symbol: 'none',
    areaStyle: { color: '#1f92ef', opacity: 1 },
    data: [],
    lineStyle: {
      width: 1,
      color: '#1f92ef'
    },
    itemStyle: {
      color: '#1f92ef'
    }
  },
  grid: {
    top: 0,
    bottom: 0,
    left: 0,
    right: 0
  }
}
const disposalStatusopt = {
  tooltip: {
    trigger: 'item',
    formatter: function (params) {
      var relVal = ''
      relVal = `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${params.color}"></span>${params.name}`
      return relVal
    },
    textStyle: {
      color: '#fff',
      fontSize: 12,
      fontFamily: '宋体'
    }
  },
  legend: {
    orient: 'vertical',
    left: '240px',
    top: '8px',
    itemWidth: 9,
    itemHeight: 10,
    icon: 'circle',
    textStyle: {
      color: '#8992a7',
      padding: [0, 0, 0, 10],
      fontFamily: '宋体'
    },
    data: []
  },
  series:
    {
      type: 'pie',
      color: ['#ffd23e', '#2092ee', '#53cb7b', '#ff9a31'],
      radius: ['50%', '70%'],
      center: ['50%', '45%'],
      avoidLabelOverlap: false,
      label: {
        normal: {
          show: false,
          formatter: '{c}',
          position: 'center'
        },
        emphasis: {
          show: true,
          color: '#5c6781',
          textStyle: {
            fontSize: '12',
            fontFamily: 'SimSun'
          }
        }
      },
      data: [

      ]
    },
  grid: {
    top: 5,
    bottom: 5,
    left: 5,
    right: 5
  }
}
export { threatLevelopt, ReportingStatistics, disposalStatusopt }
